reservations-eapi
Error handling
Whilst every effort will be made to capture all errors which may be returned for these API resources on this page, consumers are advised that as RDG are using a common service (frequently known as Software as a Service or SaaS) for the underlying technology within the reservation service, additional error cases may be added to the product at any time. If you are returned an error not recorded here, please provide details to RDG, including the request which generated the error and the error message itself, and we will investigate and add to this page.
Platform Error Format
The Developer Portal will return an error if submitted requests do not comply with one or more of an API's policies. A common example of this is the security policy, which requires a valid JWT in every request. If the request doesn't include a valid JWT then the Portal will reject the request immediately and make no attempt to process it. Rejected requests of this nature will result in a platform error, which has the following simple format (See Platform Error Object data type):
{
"error" : "error message"
}
RDG Error format
If a request passes the policy checks it will be submitted to the relevant RDG API which may then result in an RDG specific error as opposed to a generic platform error. APIs on the RDG Developer Portal use the following common error format to contain and return these errors to consumers (See RDG Error Object data type):
{
"errors": [
{
"code": "error_code",
"message": "error message",
"timestamp": "YYYY-MM-DDTHH:MM:SS",
"context":
{
"{key}": "value"
}
}
]
}
The context object is an unspecified list of key value pairs, allowing new context information to be provided without requiring a schema change.
Reservations specific error handling
For the reservations service, the below list represents the known context keys which may be returned by the source service. This list is not within RDG control and is subject to change at any time. Please report any context keys which are not in the list below to cci-support@raildeliverygroup.com and RDG will review and update this page to include them.
Field name keys:
location
disabilityType
rsid
departureDate
serviceOriginDate
ticketTypeCode
routeCode
statusCode
There may also be context items which are not field names, such as:
expected
got
reason
description
Known Error Cases
General
Code | Message | Comment |
---|---|---|
GBR-AUTH-2000 | Security Error | When RDG fails to process request due to client side or server side security failure |
GBR-AUTH-2001 | Unauthorised User | When user’s token is invalid |
GBR-AUTH-2002 | Security validation: precondition failed | - |
GBR-AUTH-2003 | Security validation: Bad request | When request payload has failed to process |
GBR_EXCEPTION_0000 | Unknown Error | Catch all for any unknown errors |
GBR_EXCEPTION_0001 | Undefined error by 3rd party system | Unknown error from 3rd party APIs |
GBR_EXCEPTION_3000 | Invalid schema/ Invalid payload | Bad request due to payload not conforming to the json/xml schema definition |
GBR_EXCEPTION_3001 | Internal Error | Unable to complete operation |
GBR_EXCEPTION_3006 | Resource not found | When API resource request is not found or not defined in the specification |
GBR_EXCEPTION_3007 | Method not allowed | When API resource request doesn’t conform to the API specfication e.g. method GET is expected for a resource but POST or PUT call is made |
GBR_EXCEPTION_3009 | Unsupported media type | When API resource request media type (e.g. application/json) doesn’t conform to the expected media type |
GBR_EXCEPTION_3010 | HTTP too many requests | Rate-limit exceeded |
GBR_EXCEPTION_3011 | AWS S3 bad request error | When AWS S3 throws error due to processing error of the request |
GBR_EXCEPTION_3012 | Invalid schema/ Invalid payload | Bad request due to payload not conforming to the json/xml schema definition |
GBR_EXCEPTION_3013 | Invalid schema/ Invalid payload | Bad request due to payload not conforming to the json/xml schema definition |
GBR_EXCEPTION_3014 | Forbidden Error | When source system doesn’t allow access to a particular resource for a specfic client |
GBR_EXCEPTION_3015 | Validation Error [Email is valid] | The structural conformation of email is checked and throws error if doesn’t match the built in REGEX pattern |
GBR_EXCEPTION_3063 | Expression error | When any form of REGEX failed to excute due to incorrect inputs |
GBR_EXCEPTION_3065 | Retry exhausted, Redelivery Exhausted | Retry component reaches the threshold number with respect to HTTP requests made |
GBR_EXCEPTION_3066 | Connectivity issue or service is not available | When cannot reach the resource URL or underneath service doesn’t respond |
GBR_EXCEPTION_3067 | HTTP time out | When the HTTP request gets timed out |
RAML_ERROR | Invalid schema/ Invalid payload | Bad request due to payload not conforming to the json/xml schema definition |
Availability
Code | Message | Comment |
---|---|---|
could_not_find_disability_type | n/a | A requested disability type is invalid |
could_not_find_passenger_type | n/a | A requested status code is invalid |
could_not_find_product | n/a | A requested product is invalid |
could_not_find_station | n/a | A requested station could not be found or is invalid |
could_not_find_tariff_group | n/a | A requested route code is invalid |
invalid_field | n/a | An invalid value has been specified within a restricted field |
over_max_booking_size | n/a | Number of passengers greater than permitted |
sales_restriction | n/a | Reservations cannot be made on a requested service |
service_not_in_roster | n/a | A requested service could not be found |
value_not_unique | n/a | Returned if the same identifier is used more than once |
Booking
Code | Message | Comment |
---|---|---|
4 | Request does not conform to specification | The request included invalid data which cannot be accepted |
14 | Invalid JSON Request - the request is not valid according to the schema | A request does not conform to the schema |
503 | until-successful retries exhausted. failed: service unavailable (503) | - |
3016 | Could not find a booking with the given bookingNumber {bookingRef} | Requested booking could not be found |
3034 | No logical or physical availability | Requested tariff is unavailable |
3084 | Tariff {tariff} for item(s) with id(s) REF: {uuid} is/are not bookable due to breaking tariff conditions | Not authorised to book this tariff |
3165 | Booking: Could not allocate seat | Requested seat does not exist or is not available |
13055 | Item in the request not found in the booking | Cannot find requested item (e.g. seat) to amend |
13058 | service {rsid} not found on {date} | The requested service could not be found |
13068 | Tariff {tariff} not configured for specified Tariff Group {route code} | - |
13080 | Sales restriction found for {rsid} | Reservations cannot be made on the requested service |
13084 | Reset seat is not allowed on confirmed items | - |
13140 | Cancel items request requires at least one valid reference id to be passed | Cannot find requested item (e.g. seat) to cancel |
GBR_RARS_6000 | Unable to perform this update on a Booking not created by the Reservation Interface & [nature of the error as to why the failure occurred e.g. timeout] | - |
GBR_RARS_6300 | Unknown carrierCode | - |
GBR_RARS_6301 | No inventory configured for Service | - |
GBR_RARS_6400 | Booking updated successfully but final Booking retrieval failed | - |
GBR_RARS_6401 | Unable to perform this update on a Booking not created by the Reservation Interface | - |
GBR_RARS_6402 | Passenger not found [requested passenger uuid] | - |
GBR_RARS_6403 | Unable to blank passenger details | - |
GBR_RARS_6404 | Leg not found [requested leg id] | - |
GBR_RARS_6405 | Successfully cancelled items | - |
GBR_RARS_6406 | Could not find booking with given Service and Seat | - |
Services (Coach)
Code | Message | Comment |
---|---|---|
7001 | Requested service could not be found | The requested service could not be found |
7002 | Requested station not found on requested service | The boardLocation and/or alightLocation are not on this service |
7004 | Departure station sequence should be before arrival station sequence | boardLocation is after the alightLocation in the service's schedule |
8002 | No schedule found for this service | The requested service could not be found |
GBR_RARS_6300 | Unknown carrierCode | - |
GBR_RARS_6301 | No inventory configured for Service | - |
GBR_RARS_6302 | No Bookings made for Service | The service has inventory available but no bookings have yet been made on it |
no_record_found | error | The requested service could not be found |
Last update: 01-Dec-2023 09.55: ASSIST API Documentation Maintenance: 'reservations-eapi', Version 'v1', Page 'Error handling', Revision 'F'.
To request updates to this text please contact Neil Barkham.